Unit BDojoStoreUnit;

{$mode objfpc}{$H+}

Interface

Uses
  Classes, SysUtils, BDojoSessionUnit;

Type

{ BDojoStoreClass }

 BDojoStoreClass = Class(BDojoObjectClass)
  Private
  Public
    Procedure Add(Const aObjectString: String);
    Function Get(Const aParam: String; Const aIndex: Integer): String;
    Procedure Remove(Const aIndex: Integer);

End;

Implementation

{ BDojoStoreClass }

Procedure BDojoStoreClass.Add(Const aObjectString: String);
Begin
  AddAjax('add({%s});', [aObjectString]);
End;

Function BDojoStoreClass.Get(Const aParam: String;
  Const aIndex: Integer): String;
Begin
  Result := RequestParam(aParam, 'get(%d)', [aIndex]);
End;

Procedure BDojoStoreClass.Remove(Const aIndex: Integer);
Begin
  AddAjax('remove(%d);', [aIndex]);
End;

End.

